package cc.telecomdigital.tdstock.utils;

public class WorldIndex implements BMPEntityBase
{
	/*
	 * 日經指數，倫敦富時，德國DAX，道瓊斯， 
	 * 南韓KOSPI，新加坡STI，加權TAI，澳洲AORD，
	 * 新西蘭NZX，印度SEN，曼谷SET，椰加達JKT，
	 * 吉隆坡KLS，馬尼拉PSI，納指NASD，標普S&P，
	 * 法國CAC，
	 * 深圳SZA，深圳SZB
	 */
	static final public String[]	TypeName_Other		= { "N225", "FTSE", "GDAX", "DJI",
															"KOSPI", "STI", "TWII", "AORD", 
															"NZTOP", /*"BOMBAY",*/ "THAI", "JKSE",
															"KLSE", "PHSI", "NDX", "SP500", 
															"CAC40", 
															"SZEA", "SZEB"
	};/*隐藏印度SEN index=10*/
	/*
	 * 上証(SSEI)， 收費項目
	 * 上証指数，滬深300，上海SSA，上海SSB，
	 */
	static final public String[] 	TypeName_SSEI		= { "SSE1", "SS300", "SSEA", "SSEB" };
	
	static final public String		TypeName_Other_Str_Tab0	= "N225,FTSE,GDAX,DJI"; 
	static final public String		TypeName_Other_Str_Tab2	= "SZEA,SZEB";
//	static final public String		TypeName_Other_Str_Tab3	= "N225,KOSPI,STI,TWII,AORD,NZTOP,BOMBAY,THAI,JKSE,KLSE,PHSI";/*隐藏印度SEN index=10*/
	static final public String		TypeName_Other_Str_Tab3	= "N225,KOSPI,STI,TWII,AORD,NZTOP,THAI,JKSE,KLSE,PHSI";/*隐藏印度SEN index=10*/
	static final public String		TypeName_Other_Str_Tab4	= "FTSE,GDAX,DJI,NDX,SP500,CAC40"; 
	
	static final public String 		TypeName_SSEI_Str_Tab0	= "SSE1";
	static final public String 		TypeName_SSEI_Str_Tab2	= "SSE1,SS300,SSEA,SSEB";

	static final public String		Name				= "Name";
	static final public String		Last				= "Last";
	static final public String		Net					= "Net";
	static final public String		NetPercentage		= "NetPercentage";
	static final public String		High				= "High";
	static final public String		Low					= "Low";
	static final public String		Open				= "Open";
	static final public String		Vol					= "Vol";
	static final public String		Prev				= "Prev";

	static final public String[]	FIELD_ITEMS		= { Name, Last, Net, High, Low, Open, Prev, Vol };
	static final public String[]	FIELD_ITEMS_MONITOR	= { Name, Last, Net, Prev };

	private String					name;
	private String					last;
	private String					net;
//	private String					netPercentage;
	private String					high;
	private String					low;
	private String					open;
	private String					vol;
	private String					prev;

	@Override
	public void SetValueByFIELDS_MONITOR(int i, String value)
	{
		switch (i)
		{
			case 0:
				setName(value);
				break;
			case 1:
				setLast(value);
				break;
			case 2:
				setNet(value);
				break;
			case 3:
				setPrev(value);
				break;
		}
	}
	
	@Override
	public void SetValueByFIELDS(int i, String value)
	{
		switch (i)
		{
			case 0:
				setName(value);
				break;
			case 1:
				setLast(value);
				break;
			case 2:
				setNet(value);
				break;
			case 3:
				setHigh(value);
				break;
			case 4:
				setLow(value);
				break;
			case 5:
				setOpen(value);
				break;
			case 6:
				setPrev(value);
				break;
			case 7:
				setVol(value);
				break;
		}
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getLast()
	{
		return last;
	}

	public void setLast(String last)
	{
		this.last = last;
	}

	public String getNet()
	{
		return net;
	}

	public void setNet(String net)
	{
		this.net = net;
	}

//	public String getNetPercentage()
//	{
//		return netPercentage;
//	}
//
//	public void setNetPercentage(String netPercentage)
//	{
//		this.netPercentage = netPercentage;
//	}

	public String getHigh()
	{
		return high;
	}

	public void setHigh(String high)
	{
		this.high = high;
	}

	public String getLow()
	{
		return low;
	}

	public void setLow(String low)
	{
		this.low = low;
	}

	public String getOpen()
	{
		return open;
	}

	public void setOpen(String open)
	{
		this.open = open;
	}

	public String getVol()
	{
		return vol;
	}

	public void setVol(String vol)
	{
		this.vol = vol;
	}

	public String getPrev()
	{
		return prev;
	}

	public void setPrev(String prev)
	{
		this.prev = prev;
	}

	@Override
	public void SetValueByFIELDS_COP(int index, String value)
	{
	}

	@Override
	public void SetValueByFIELDS_NET(int index, String value)
	{
	}

	@Override
	public void SetValueByFIELDS_STOCK(int index, String value)
	{
	}

	@Override
	public void SetValueByFIELDS_TURNOVER(int index, String value)
	{
	}

	@Override
	public String GetKey()
	{
		return name;
	}

	@Override
	public void SetKeyValue(String value)
	{
		name = value;
	}

}
